home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Bus / M / Machine Name.cpt / Machine Name / Machine Name.c next >
Text File  |  1991-10-20  |  582b  |  26 lines

  1. // Get Machine Name
  2. // Excel™ 3.0 External Code Resource
  3. // Copyright® 1991 Cutting Edge Enterprises
  4.  
  5. // FreeWare
  6.  
  7. // Questions or Comments
  8. // GEnie        R.HARGIS2
  9. // AppleLink    CUTTING.EDGE
  10.  
  11.  
  12. #include <GestaltEqu.h>
  13.  
  14. pascal unsigned char * main(unsigned char *nameString)
  15.     {
  16.  
  17. long    response;                                            // Return value from Gestalt
  18.  
  19.     Gestalt(gestaltMachineType,&response);                    // Call Gestalt, request machine type
  20.     
  21.     GetIndString(nameString,kMachineNameStrID,response);    // Get machine ID from response value
  22.  
  23.     return(nameString);                                        // Return pascal name string back to Excel™
  24.  
  25.     }
  26.